// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_BPT_APP
// * CreateDate    : 2014-06-05 18:29:41
// * Creater       : CodeSmith
// * LastChangeDate: 2014-06-05 18:29:41
// * LastChanger   : 2014-06-05 18:29:41
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;
using ESOL.Common;

namespace ESOL.Common.Entity
{
    [DataContract]
	[Serializable]
	public partial class BptAppEntity : EntityBase
    {
        public BptAppTable TableSchema
        {
            get
            {
                return BptAppTable.Current;
            }
		}
		
		public BptAppEntity()
        {

        }
		
		public BptAppEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
			this.IsActive = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_ACTIVE"]));
			this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
			this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
			this.UpdatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["UPDATED_DATE"]));
			this.UpdatedBy = Convert.ToString(CommonFunctions.ToObject(dr["UPDATED_BY"]));
			this.AppType = Convert.ToString(CommonFunctions.ToObject(dr["APP_TYPE"]));
			this.AppCode = Convert.ToString(CommonFunctions.ToObject(dr["APP_CODE"]));
			this.RequiredDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["REQUIRED_DATE"]));
			this.SalesAppId = Convert.ToString(CommonFunctions.ToObject(dr["SALES_APP_ID"]));
			this.SalesAppItemId = Convert.ToString(CommonFunctions.ToObject(dr["SALES_APP_ITEM_ID"]));
			this.AssignUser = Convert.ToString(CommonFunctions.ToObject(dr["ASSIGN_USER"]));
			this.Description = Convert.ToString(CommonFunctions.ToObject(dr["DESCRIPTION"]));
			this.FinishedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["FINISHED_DATE"]));
			this.Material = Convert.ToString(CommonFunctions.ToObject(dr["MATERIAL"]));
			this.ContractModel = Convert.ToString(CommonFunctions.ToObject(dr["CONTRACT_MODEL"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
			this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
        }
		
		public BptAppEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
			this.IsActive = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_ACTIVE"]));
			this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
			this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
			this.UpdatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["UPDATED_DATE"]));
			this.UpdatedBy = Convert.ToString(CommonFunctions.ToObject(dr["UPDATED_BY"]));
			this.AppType = Convert.ToString(CommonFunctions.ToObject(dr["APP_TYPE"]));
			this.AppCode = Convert.ToString(CommonFunctions.ToObject(dr["APP_CODE"]));
			this.RequiredDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["REQUIRED_DATE"]));
			this.SalesAppId = Convert.ToString(CommonFunctions.ToObject(dr["SALES_APP_ID"]));
			this.SalesAppItemId = Convert.ToString(CommonFunctions.ToObject(dr["SALES_APP_ITEM_ID"]));
			this.AssignUser = Convert.ToString(CommonFunctions.ToObject(dr["ASSIGN_USER"]));
			this.Description = Convert.ToString(CommonFunctions.ToObject(dr["DESCRIPTION"]));
			this.FinishedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["FINISHED_DATE"]));
			this.Material = Convert.ToString(CommonFunctions.ToObject(dr["MATERIAL"]));
			this.ContractModel = Convert.ToString(CommonFunctions.ToObject(dr["CONTRACT_MODEL"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
			this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return BptAppTable.Current;
            }
        }
		
		#region Perporty List
        [DataMember]
        public string Id
        {
            get { return Convert.ToString(GetData(BptAppTable.C_ID)); }
            set { SetData(BptAppTable.C_ID, value); }
        }
		
        [DataMember]
        public int IsActive
        {
            get { return Convert.ToInt32(GetData(BptAppTable.C_IS_ACTIVE)); }
            set { SetData(BptAppTable.C_IS_ACTIVE, value); }
        }
		
        [DataMember]
        public DateTime CreatedDate
        {
            get { return Convert.ToDateTime(GetData(BptAppTable.C_CREATED_DATE)); }
            set { SetData(BptAppTable.C_CREATED_DATE, value); }
        }
		
        [DataMember]
        public string CreatedBy
        {
            get { return Convert.ToString(GetData(BptAppTable.C_CREATED_BY)); }
            set { SetData(BptAppTable.C_CREATED_BY, value); }
        }
		
        [DataMember]
        public DateTime UpdatedDate
        {
            get { return Convert.ToDateTime(GetData(BptAppTable.C_UPDATED_DATE)); }
            set { SetData(BptAppTable.C_UPDATED_DATE, value); }
        }
		
        [DataMember]
        public string UpdatedBy
        {
            get { return Convert.ToString(GetData(BptAppTable.C_UPDATED_BY)); }
            set { SetData(BptAppTable.C_UPDATED_BY, value); }
        }
		
        [DataMember]
        public string AppType
        {
            get { return Convert.ToString(GetData(BptAppTable.C_APP_TYPE)); }
            set { SetData(BptAppTable.C_APP_TYPE, value); }
        }
		
        [DataMember]
        public string AppCode
        {
            get { return Convert.ToString(GetData(BptAppTable.C_APP_CODE)); }
            set { SetData(BptAppTable.C_APP_CODE, value); }
        }
		
        [DataMember]
        public DateTime RequiredDate
        {
            get { return Convert.ToDateTime(GetData(BptAppTable.C_REQUIRED_DATE)); }
            set { SetData(BptAppTable.C_REQUIRED_DATE, value); }
        }
		
        [DataMember]
        public string SalesAppId
        {
            get { return Convert.ToString(GetData(BptAppTable.C_SALES_APP_ID)); }
            set { SetData(BptAppTable.C_SALES_APP_ID, value); }
        }
		
        [DataMember]
        public string SalesAppItemId
        {
            get { return Convert.ToString(GetData(BptAppTable.C_SALES_APP_ITEM_ID)); }
            set { SetData(BptAppTable.C_SALES_APP_ITEM_ID, value); }
        }
		
        [DataMember]
        public string AssignUser
        {
            get { return Convert.ToString(GetData(BptAppTable.C_ASSIGN_USER)); }
            set { SetData(BptAppTable.C_ASSIGN_USER, value); }
        }
		
        [DataMember]
        public string Description
        {
            get { return Convert.ToString(GetData(BptAppTable.C_DESCRIPTION)); }
            set { SetData(BptAppTable.C_DESCRIPTION, value); }
        }
		
        [DataMember]
        public DateTime FinishedDate
        {
            get { return Convert.ToDateTime(GetData(BptAppTable.C_FINISHED_DATE)); }
            set { SetData(BptAppTable.C_FINISHED_DATE, value); }
        }
		
        [DataMember]
        public string Material
        {
            get { return Convert.ToString(GetData(BptAppTable.C_MATERIAL)); }
            set { SetData(BptAppTable.C_MATERIAL, value); }
        }
		
        [DataMember]
        public string ContractModel
        {
            get { return Convert.ToString(GetData(BptAppTable.C_CONTRACT_MODEL)); }
            set { SetData(BptAppTable.C_CONTRACT_MODEL, value); }
        }
		
        [DataMember]
        public string Remark
        {
            get { return Convert.ToString(GetData(BptAppTable.C_REMARK)); }
            set { SetData(BptAppTable.C_REMARK, value); }
        }
		
        [DataMember]
        public string Status
        {
            get { return Convert.ToString(GetData(BptAppTable.C_STATUS)); }
            set { SetData(BptAppTable.C_STATUS, value); }
        }
		
		#endregion
	}
	
	
}	

